Skip to content

fix(session): attribute selected-provider capabilities to the resolved identity - #2013

Merged
morluto merged 1 commit into
mainfrom
fix/issue-2009
Oct 12, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/issue-2009

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Fixes #2009

Problem

Profile resolution gives Ghidra and Hopper a concrete version. Their static identity has version: null. After #1988 grouped capability facts by provider, binary_session put the selected provider's capability sets (top-level and on the selected candidate) under the static identity. The binding and the selected candidate's provider use the resolved one. The same provider therefore appeared under two identities, and its capability facts lost the known version. Codex raised this on #1988 and nobody followed up.

Change

  • AnalysisProviderRegistry.selectedResult rebinds the selected provider's capabilities to the resolved profile identity once. It stores them on the binding (AnalysisProviderBinding.capabilities) and on the selected candidate status.
  • SessionProviderRouter builds route capabilities from the auxiliary providers plus the binding's rebound capabilities. Operation routing still goes through the provider itself.
  • BinarySession.providerIdentity and DirectAnalysis.providerIdentityForRoute used to swap in the profile identity downstream. The route now carries the resolved identity, so that repair is gone.

Contract impact: the provider.version values in binary_session capability sets now match analysis_provider_binding.provider for the selected provider. The schema is unchanged.

Validation

  • New composition regression in tests/composition/analysis-sessions/providerBinding.test.ts, using the existing deep-provider fixture: static version: null, resolved "1". It fails on the base commit with version: null in the selected candidate's capability set, and passes with this change.
  • npm run lint passes, and tsc --noEmit passes.
  • npm test: 8,613 passed and 12 failed. The 12 failures are in 5 files: interfaceBuilderBundle, nibNativeHierarchy, javascriptRuntimeObservation, javascriptRuntimeTargetLocations and nativeDmgArtifactReader. They fail identically on the unchanged base commit on this host (macOS, Command Line Tools only, no ibtool), so they are environmental and unrelated to this change.

Real-provider scope: verified only with the simulated provider fixture. No real Ghidra or Hopper run was done.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T02:12:45.949134Z 4554c5a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jimpablo

Copy link
Copy Markdown
Contributor

Reviewed with fresh context from the issue and the #1988 thread. The shape matches the producing-representation rule: the identity is resolved once in selectedResult, both the binding and the selected-candidate status carry the rebound capabilities, and the two downstream substitutions in BinarySession.providerIdentity / DirectAnalysis.providerIdentityForRoute are correctly removable because route.capabilities now carries the resolved identity itself — the simplified fallback chain still behaves for operations owned by auxiliary providers, which keep their own (already concrete) identities.

One observation, not a blocker: the rebound capabilities array instance is shared between binding.capabilities and the selected candidate status. Both are readonly typed so nothing mutates it today; a defensive copy at one of the two sites would only matter if a consumer ever held the binding across status rebuilds.

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator Author

CI note: the 7 failing tests on this PR (Electron identity acceptance, javascriptStaticAnalysis.no_finding_caps, compactInputSchemaMcp, enhancedTools.01) fail identically in main's own CI run for edf4624 (https://github.com/morluto/rea/actions/runs/38192431921). They predate this change.

…d identity

Profile resolution gives Ghidra and Hopper a concrete version, but the
selected candidate's capabilities and the session route kept the
provider's static identity with a null version. binary_session therefore
grouped capability sets under a different identity than the binding and
the selected candidate.

The registry now rebinds the selected provider's capabilities to the
resolved identity once, on the binding, and the route uses them. Evidence
provenance already compensated downstream by substituting the profile
identity; that repair is removed because the route now carries the
resolved identity.

Fixes #2009

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@morluto
morluto merged commit 2ff850d into main Oct 12, 2026
31 checks passed
@morluto
morluto deleted the fix/issue-2009 branch October 12, 2026 02:36
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: providers Provider and capability discovery, including provider proposal triage labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

binary_session capability sets label the selected provider with its unresolved identity

3 participants